class MyCalendarRoomModel {
  int? errcode;
  String? errmsg;
  List<MyCalendarRoomItem>? data;
  String? message;

  MyCalendarRoomModel({this.errcode, this.errmsg, this.data, this.message});

  MyCalendarRoomModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    if (json['data'] != null) {
      data = <MyCalendarRoomItem>[];
      json['data'].forEach((v) {
        data!.add(new MyCalendarRoomItem.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    return data;
  }
}

class MyCalendarRoomItem {
  int? id;
  String? name;
  int? max;
  bool? isUse;

  MyCalendarRoomItem({this.id, this.name, this.max, this.isUse});

  MyCalendarRoomItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    max = json['max'];
    isUse = json['is_use'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['max'] = this.max;
    data['is_use'] = this.isUse;
    return data;
  }
}
